﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CompareExample.aspx.cs" Inherits="Examples_Validations_CompareExample" %>
<%@ Register TagPrefix="mobile"
    Namespace="System.Web.UI.MobileControls"
    Assembly="System.Web.Mobile" %>
    <mobile:Form id="Form1" runat="server">
    <mobile:Label runat="server">
        Your Password
    </mobile:Label>
    <mobile:TextBox id="password1" runat="server" password="true"/>
    <mobile:Label runat="server">
        Retype password
    </mobile:Label>
    <mobile:TextBox id="password2" runat="server" password="true"/>
    <mobile:CompareValidator id="CompareValidator1"
        Type="String"
        Operator="Equal"
        runat="server"
        ErrorMessage="Passwords do not match!"
        ControlToCompare="password1"
        ControlToValidate="password2"/>
    <mobile:Command id="Command1"
        OnClick="Command1_Click" runat="server">
        Submit
     </mobile:Command>
</mobile:Form>
   
<mobile:Form id="Form2" runat="server">
    <mobile:Label runat="server">
        Passwords match!
    </mobile:Label>
</mobile:Form>